<template>
    <page-body>
        <view class="page">
            <view class="flex align-stretch benben-position-layout flex my_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
                <view class='flex align-center justify-between flex-sub my_fd0_0'>
                    <view class='flex align-center my_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/index/myNew/myNew`">
                        <image class='my_fd0_0_c0_c0' mode="aspectFit" :src='STATIC_URL+"199.png"'></image>
                        <benben-message-num class='my_fd0_0_c0_c1' :message-num="nume.all" size='22' color='#fff' background-color='red'>
                        </benben-message-num>
                    </view>
                    <view class='flex align-center my_fd0_0_c1'>
                    </view>
                </view>

            </view>
            <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center my_flex_1" v-if=" isLogin===true">
                <image class='my_fd1_0' mode="aspectFill" :src='user.avatar' @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/myInfo/myInfo`"></image>
				<view class='flex flex-direction align-stretch flex-sub my_fd1_1_ben'  @tap.stop="handleJumpDiy" data-type="navigateTo" :data-url="`/pages/my/myInfo/myInfo`">
					<text class='flex-sub my_fd1_1'>{{user.nickname}}</text>
					<view class='flex flex-wrap align-center my_fd1_1_c1_ben'>
						<view class='flex flex-wrap align-center justify-center my_fd1_1_c1_c0_ben'>
							<text class='fu-iconfont2  my_fd1_1_c1_c0_c0_ben'>&#xe72b;</text>
						</view>
						<text class='my_fd1_1_c1_c1_ben'>{{user.mobile}}</text>
					</view>
				</view>
                
                <view class='flex flex-wrap align-center my_fd1_2' @tap.stop="qiehuan" v-if="renzheng.status==1">
                    <image class='my_fd1_2_c0' mode="aspectFit" :src='STATIC_URL+"68.png"'></image>
                    <text class='my_fd1_2_c1'>切换骑手</text>
                </view>
            </view>

            <!---flex布局flex布局结束-->
            <!---flex布局flex布局开始-->
            <view class="flex benben-flex-layout flex-wrap align-center my_flex_2" @tap.stop="handleJumpDiy" data-type="navigateTo" 
									:data-url="`/pages/tabBar/login/login?type=1`" v-if=" isLogin===false">
                <image class='my_fd2_0' mode="aspectFit" :src='STATIC_URL+"69.png"'></image>
                <text class='flex-sub my_fd2_1'>请登录</text>
				<!-- <view class='flex flex-wrap align-center my_fd1_2' @tap.stop="handleJumpDiy" data-type="navigateTo"
									:data-url="`/pages/tabBar/login/login?type=2`">
				    <image class='my_fd1_2_c0' mode="aspectFit" :src='STATIC_URL+"68.png"'></image>
				    <text class='my_fd1_2_c1'>骑手登录</text>
				</view> -->
            </view>
			
			<view class="flex flex-wrap align-center justify-around benben-flex-layout my_flex_3_ben">
				<!-- <view class='flex flex-direction flex-wrap align-center my_fd3_0_ben' @tap.stop="handleJumpDiy"
					data-type="navigateTo" :data-url="`/pages/my/wallet/wallet`">
					<view class='my_fd3_0_c0_ben'>
						<text class='my_fd3_0_c0_c0_ben'>¥</text>
						<text>{{detal.user_money || 0}}</text>
					</view>
					<text class='my_fd3_0_c1_ben'>我的钱包</text>
				</view> -->
			
				<view class='flex  my_fd3_1_ben'></view>
			
				<view class='flex flex-direction flex-wrap align-center my_fd3_0_ben' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/myCollect/myCollect`">
					<view class='my_fd3_0_c0_ben'>
						<text>{{detal.collect_number || 0}}</text>
					</view>
					<text class='my_fd3_0_c1_ben'>我的收藏</text>
				</view>
			
				<view class='flex  my_fd3_1_ben'></view>
			
				<view class='flex flex-direction flex-wrap align-center my_fd3_0_ben' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/myCoupon/myCoupon`">
					<view class='my_fd3_0_c0_ben'>
						<text>{{detal.coupon_number || 0}}</text>
					</view>
					<text class='my_fd3_0_c1_ben'>优惠券</text>
				</view>
			</view>
			<view class="flex flex-direction align-stretch benben-flex-layout my_flex_4_ben">
				<text class='my_fd4_0_ben'>常用功能</text>
				<view class='flex flex-wrap align-center justify-between my_fd4_2_ben'>
					<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="navigateTo" 
					    :data-url="`/pages/my/addressManagement/addressManagement?type=1`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"191.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">收货地址</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center my_fd4_1_c1_ben' @tap.stop="handleJumpDiy" data-type="navigateTo" 
					    :data-url="`/pages/my/addressManagement/addressManagement?type=2`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"192.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">取货地址</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/my/myReview/myReview`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"193.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">我的评价</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/userSet/kf/kf`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"194.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">客服中心</text>
					</view>
				</view>
				<view class='flex flex-wrap align-center justify-between my_fd4_2_ben'>
					<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" 
					    data-type="navigateTo" :data-url="`/pages/userSet/system/system`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"195.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">系统设置</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center my_fd4_1_c1_ben' @tap.stop="handleJumpDiy"
						data-type="navigateTo" :data-url="`/pages/userSet/helpFeedback/helpFeedback`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"196.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">帮助中心</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" 
					    data-type="navigateTo" :data-url="`/pages/userSet/feedBack/feedBack`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"197.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">意见反馈</text>
					</view>
					<view class='flex flex-direction flex-wrap align-center' @tap.stop="handleJumpDiy" 
					    data-type="navigateTo" :data-url="`/pages/userSet/aboutUs/aboutUs`">
						<view class='flex flex-wrap align-center my_fd4_1_c0_c0_ben'>
							<image class='my_fd4_1_c0_c0_c0_ben' mode="aspectFit" :src='STATIC_URL+"198.png"'></image>
						</view>
						<text class="my_fd4_1_c0_c0_c1_ben">关于我们</text>
					</view>
				</view>
			</view>
			<view class="flex flex-wrap align-center justify-center benben-flex-layout my_flex_5_ben" @tap.stop="qishou">
				<image class='my_fd5_0_ben' mode="aspectFill" :src='rider_background'></image>
			</view>
			
			
        </view>
    </page-body>
</template>
<script>
    import {
        validate
    } from '@/common/utils/validate.js'

    export default {
        components: {},


        data() {
            return {
                "user": {
                    "invite_code": "",
                    "address": "",
                    "address_code": "",
                    "hobby": "",
                    "tags": "",
                    "id": "",
                    "userlevel_id": "",
                    "mobile": "",
                    "real_name": "",
                    "avatar": "",
                    "account": "",
                    "email": "",
                    "birthday": "",
                    "gender": "",
                    "create_time": "",
                    "user_money": "",
                    "freeze_money": "",
                    "total_consumption_money": "",
                    "score": "",
                    "_mobile": "",
                    "coupon": "",
                    "total_money": "",
                    "certified": "",
                    "nickname": "",
                    "is_pay_password": "",
                    "is_close": "",
                    "login_url": "",
                    "is_cancel": ""
                },
				detal:'',
				renzheng:'',
				nume:{},
				rider_background:'',
            };
        },
        computed: {
            isLogin() {
                return this.$store.state.token == '' ? false : true;
            }
        },
        watch: {},
        onLoad(options) {

        },
        onUnload() {

        },
        onReady() {

        },
        onShow() {
           
        },
        onHide() {

        },
        onResize() {

        },
        onPullDownRefresh() {

        },
        onReachBottom(e) {

        },
        onPageScroll(e) {

        },
        methods: {
			async post6673ead3a1831(){
				let datadetail = await this.$api.get(global.apiUrls.post6673ead3a1831);
				if (datadetail.data.code != 1) {
				    this.$message.info(datadetail.data.msg);
				    return
				}
				let infodetail = datadetail.data;
				// console.log(infodetail,'接收参数')
				this.rider_background = infodetail.data.rider_background
			},
			qishou(){
				
				if(this.renzheng.code == 0){
					this.$urouter.navigateTo(`/pages/my/riderRz/riderRz`);
				} else {
					this.$urouter.navigateTo(`/pages/my/revieweds/revieweds`);
				}
			},
			together(){
				this.getfdc78c4772da97Func()
				this.post64783bd767b3f()
				this.getju46dbd2786211Func()
				this.post649039e86761b()
				this.post6673ead3a1831()
			},
			//获取未读消息数量及最新消息
			async post649039e86761b() {
				//请求方法
				//数据验证
				if(this.isLogin){
					let datadetail = await this.$api.get(global.apiUrls.post649039e86761b, {
						type: 1
					});
					
					if (datadetail.data.code != 1) {
					    this.$message.info(datadetail.data.msg);
					    return
					}
					let infodetail = datadetail.data.data;
					// console.log(infodetail,123)
					this.nume = infodetail
				}else{
					this.nume={}
				}
				
			
			},
			//骑手认证状态
			async getju46dbd2786211Func() {
			    //请求方法
			    //数据验证
			    if (this.isLogin === true) {
					let datadetail = await this.$api.get(global.apiUrls.post646dbd2786211, {
								
					});
								
					if (datadetail.data.code != 1) {
					    this.$message.info(datadetail.data.msg);
					    return
					}
					let infodetail = datadetail.data;
					this.renzheng = infodetail.data
				}
			},
			qiehuan(){
				if (this.isLogin === true) {
					if(this.renzheng.code == 0){
						this.$util.showModal({
							title: '提示',
							content: '您还没有认证骑手,是否去认证？',
							confirmText: '继续',
							success: resd => {
								if (resd.confirm) {
									this.$urouter.navigateTo(`/pages/my/riderRz/riderRz`);
								}
							},
						})
						return
					}
					if(this.renzheng.status==0 || this.renzheng.status==2){
						this.$urouter.navigateTo(`/pages/my/revieweds/revieweds`);
					}else if(this.renzheng.status==1){
						uni.setStorageSync('tabberType', 2)
						uni.reLaunch({
							url: '/pages/tabBar/index/index'
						});
					}
				}else{
					this.$urouter.navigateTo(`/pages/tabBar/login/login?type=2`);
				}
			},
            //个人中心-获取会员详细信息
            async getfdc78c4772da97Func() {
                if (this.isLogin === true) {
                    //请求方法
                    //数据验证

                    let datauser = await this.$api.get(global.apiUrls.post5c78c4772da97, {

                    });

                    if (datauser.data.code != 1) {
                        this.$message.info(datauser.data.msg);
                        return
                    }
                    let infouser = datauser.data;
                    this.user = infouser.data

                }
            },
			//钱包
			async post64783bd767b3f() {
			    if (this.isLogin === true) {
			        //请求方法
			        //数据验证
			
			        let datauser = await this.$api.get(global.apiUrls.post64783bd767b3f, {
			
			        });
			
			        if (datauser.data.code != 1) {
			            this.$message.info(datauser.data.msg);
			            return
			        }
			        let infouser = datauser.data;
			        this.detal = infouser.data
			
			    }else{
					this.detal = ''
				}
			}
        }
    };
</script>
<style lang="scss" scoped>
    .page {
        width: 100vw;
        overflow-x: hidden;
        min-height: calc(100vh - var(--window-bottom));
        background: url(image-path('170.png')) no-repeat;
        background-size: 100% 480rpx;
    }

    .my_flex_0 {
        // border-bottom: 1px solid #eee;
        // background: url(image-path('170.png')) no-repeat;
        width: 750rpx;
        height: 88rpx;
        overflow: hidden;
        z-index: 10;
        top: 0rpx;
        background-size: 100% auto !important;
    }

    .my_fd0_0_c1 {
        width: 180rpx;
        height: 88rpx;
    }

    .my_fd0_0_c0_c1 {
        position: absolute;
        top: 12rpx;
        left: 25rpx;
    }

    .my_fd0_0_c0_c0 {
        width: 40rpx;
        height: 40rpx;
    }

    .my_fd0_0_c0 {
        width: 180rpx;
        height: 88rpx;
        position: relative;
    }

    .my_fd0_0 {
        padding: 0rpx 32rpx 0rpx 32rpx;
        height: 88rpx;
    }

    .my_flex_1 {
        padding: 16rpx 0rpx 72rpx 32rpx;
    }

    .my_fd1_2_c1 {
        color: #FF8E21;
        font-size: 28rpx;
        font-weight: 600;
        line-height: 48rpx;
    }

    .my_fd1_2_c0 {
        width: 32rpx;
        height: 32rpx;
        margin: 0rpx 8rpx 0rpx 0rpx;
    }

    .my_fd1_2 {
        background: #FFFFFF;
        margin: 0rpx 0rpx 0rpx auto;
        border-radius: 50rpx 0rpx 0rpx 50rpx;
        height: 72rpx;
        padding: 0rpx 24rpx 0rpx 27rpx;
    }

    .my_fd1_1 {
        color: #000;
        font-size: 36rpx;
        font-weight: 600;
        line-height: 50rpx;
        -webkit-line-clamp: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        margin: 0rpx 32rpx 0rpx 0rpx;
    }

    .my_fd1_0 {
        width: 140rpx;
        height: 140rpx;
        border-radius: 70rpx;
        margin: 0rpx 32rpx 0rpx 0rpx;
    }

    .my_flex_2 {
        padding: 16rpx 0rpx 72rpx 32rpx;
    }

    .my_fd2_1 {
        color: #000;
        font-size: 36rpx;
        font-weight: 600;
        line-height: 50rpx;
        -webkit-line-clamp: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        margin: 0rpx 32rpx 0rpx 0rpx;
    }

    .my_fd2_0 {
        width: 140rpx;
        height: 140rpx;
        border-radius: 70rpx;
        margin: 0rpx 32rpx 0rpx 0rpx;
    }

    .my_flex_3 {
        background: url(image-path('130.png')) no-repeat;
        margin: 0rpx 32rpx 0rpx 32rpx;
        background-size: 100% 100%;
        border-radius: 32rpx 32rpx 0rpx 0rpx;
        padding: 24rpx 32rpx 24rpx 32rpx;
    }

    .my_fd3_1 {
        background: linear-gradient(90deg, #F7EDD7 0%, #E9CE93 100%);
        border-radius: 40rpx 40rpx 40rpx 40rpx;
        width: 130rpx;
        line-height: 52rpx;
        font-size: 24rpx;
        color: rgba(60, 60, 85, 1);
        height: 52rpx;
    }

    .my_fd3_0_c1 {
        color: #9F9FB9;
        font-size: 22rpx;
        font-weight: 500;
        line-height: 30rpx;
    }

    .my_fd3_0_c0 {
        color: #FFFFFF;
        font-size: 28rpx;
        font-weight: 800;
        line-height: 40rpx;
        margin: 0rpx 0rpx 16rpx 0rpx;
    }

    .my_fd3_0 {
        margin: 0rpx 20rpx 0rpx 0rpx;
    }

    .my_flex_4 {
        background: var(--benbenbgColor1);
        margin: 24rpx 24rpx 24rpx 24rpx;
        background-size: 100% auto;
        border-radius: 16rpx;
        padding: 40rpx 40rpx 40rpx 40rpx;
    }
    .my_fd4_1 {
        margin: 0rpx 29rpx 0rpx 29rpx;
    }

    .my_fd4_0 {
        margin: 0rpx 0rpx 32rpx 0rpx;
        color: #333333;
        font-size: 32rpx;
        font-weight: 800;
        line-height: 45rpx;
    }

    .my_fd6_1_c0_c0 {
        width: 64rpx;
        height: 64rpx;
        border-radius: 0rpx 0rpx 0rpx 0rpx;
    }

    .my_fd6_1 {
        margin: 0rpx 29rpx 0rpx 29rpx;
    }
	.my_flex_4_ben {
		background: #FFFFFF;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		margin: 0rpx 24rpx 0rpx 24rpx;
		padding: 40rpx;
	}
	.my_fd4_0_ben {
		color: #333333;
		font-size: 32rpx;
		font-weight: 800;
	}
	.my_fd4_1_c0_c0_ben {
		border: 1px dashed #eee;
		border-radius: 0rpx 0rpx 0rpx 0rpx;
		width: 64rpx;
		height: 64rpx;
		margin: 0rpx 0rpx 24rpx 0rpx;
	}
	.my_fd4_1_c0_c0_c0_ben {
		width: 64rpx;
		height: 64rpx;
		border-radius: 0rpx;
	}
	.my_fd4_1_c0_c0_c1_ben{
		font-weight: 400;
		font-size: 24rpx;
		color: #333333;
	}
	.my_flex_3_ben {
		background: #FFFFFF;
		margin: 0rpx 24rpx 24rpx 24rpx;
		background-size: 100% auto;
		height: 188rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
	.my_fd3_0_ben {
		width: 30%;
	}
	.my_fd3_0_c0_ben {
		font-size: 38rpx;
		font-weight: 700;
		color: #2D2D2D;
	}
	.my_fd3_0_c1_ben {
		margin: 20rpx 0rpx 0rpx 0rpx;
	}
	.my_fd4_2_ben {
		padding: 40rpx 0rpx 0rpx 0rpx;
	}
	.my_fd1_1_ben {
		margin: 0rpx 24rpx 0rpx 0rpx;
	}
	.my_fd1_1_c1_ben {
		margin: 20rpx 0rpx 0rpx 0rpx;
	}
	.my_fd1_1_c1_c0_ben {
		border: 1px dashed rgba(220, 214, 214, 1);
		width: 33rpx;
		height: 33rpx;
	}
	.my_fd1_1_c1_c0_c0_ben {
		font-size: 18rpx;
	}
	.my_fd1_1_c1_c1_ben {
		color: #333333;
		font-size: 28rpx;
		font-weight: 500;
		margin: 0rpx 0rpx 0rpx 12rpx;
	}
	.my_flex_5_ben {
		margin: 24rpx 0rpx 0rpx 0rpx;
	}
	.my_fd5_0_ben {
		width: 702rpx;
		height: 234rpx;
		border-radius: 16rpx 16rpx 16rpx 16rpx;
	}
</style>